<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>遗体捐献告别仪式管理系统</title>
    <script>
        // 页面加载时设置默认用户信息
        (function() {
            // 设置默认的遗体捐献管理用户信息
            if (!localStorage.getItem('organDonationCurrentUser')) {
                localStorage.setItem('organDonationCurrentUser', JSON.stringify({
                    name: '遗体捐献管理员',
                    role: '遗体捐献管理员'
                }));
                localStorage.setItem('organDonationIsLoggedIn', 'true');
            }
        })();
    </script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #333;
            min-height: 100vh;
        }

        .container {
            display: flex;
            min-height: 100vh;
        }

        /* 左侧侧边栏 */
        .sidebar {
            width: 280px;
            background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
            color: white;
            padding: 0;
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
            position: fixed;
            height: 100vh;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 30px 20px;
            background: rgba(255, 255, 255, 0.1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 20px;
            text-align: center;
        }

        .sidebar-title {
            font-size: 22px;
            font-weight: bold;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .nav-menu {
            list-style: none;
            padding: 0 15px;
        }

        .nav-item {
            margin-bottom: 8px;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            color: white;
            text-decoration: none;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 12px;
            border-left: 4px solid transparent;
        }

        .nav-link:hover, .nav-link.active {
            background: rgba(255, 255, 255, 0.1);
            border-left-color: #60a5fa;
            transform: translateX(5px);
        }

        .nav-icon {
            margin-right: 15px;
            font-size: 18px;
        }

        /* 右侧主内容区域 */
        .main-content {
            flex: 1;
            margin-left: 280px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.95);
        }

        .content-header {
            background: white;
            padding: 25px 30px;
            border-radius: 15px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
        }

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .header-left h1 {
            font-size: 28px;
            color: #1e3a8a;
            margin-bottom: 8px;
        }

        .breadcrumb {
            color: #6b7280;
            font-size: 14px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .user-avatar {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
        }

        .user-details {
            text-align: right;
        }

        .user-name {
            font-weight: bold;
            color: #1e3a8a;
            margin-bottom: 4px;
        }

        .user-role {
            color: #6b7280;
            font-size: 14px;
        }

        .btn-logout {
            background: #ef4444;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-logout:hover {
            background: #dc2626;
        }

        /* 功能模块样式 */
        .function-module {
            background: white;
            border-radius: 15px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            overflow: hidden;
        }

        .module-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 30px;
            font-size: 18px;
            font-weight: bold;
        }

        .module-content {
            padding: 30px;
        }

        /* 数据表格样式 */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .data-table th {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px;
            text-align: left;
            font-weight: 600;
        }

        .data-table td {
            padding: 15px;
            border-bottom: 1px solid #e5e7eb;
        }

        .data-table tr:hover {
            background: #f8fafc;
        }

        .status-badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .status-active {
            background: #dcfce7;
            color: #166534;
        }

        .status-inactive {
            background: #fef2f2;
            color: #dc2626;
        }

        .status-pending {
            background: #fef3c7;
            color: #92400e;
        }

        .status-completed {
            background: #dbeafe;
            color: #1e40af;
        }

        .action-buttons {
            display: flex;
            gap: 8px;
        }

        .btn-action {
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s ease;
        }

        .btn-action-view {
            background: #3b82f6;
            color: white;
        }

        .btn-action-view:hover {
            background: #2563eb;
        }

        .btn-action-edit {
            background: #f59e0b;
            color: white;
        }

        .btn-action-edit:hover {
            background: #d97706;
        }

        .btn-action-delete {
            background: #ef4444;
            color: white;
        }

        .btn-action-delete:hover {
            background: #dc2626;
        }

        .btn-action-approve {
            background: #10b981;
            color: white;
        }

        .btn-action-approve:hover {
            background: #059669;
        }

        .btn-action-reject {
            background: #f97316;
            color: white;
        }

        .btn-action-reject:hover {
            background: #ea580c;
        }

        /* 表单样式 */
        .form-container {
            background: white;
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 25px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-label {
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
        }

        .form-input {
            padding: 12px 15px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .form-textarea {
            padding: 12px 15px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s ease;
            resize: vertical;
            min-height: 100px;
        }

        .form-textarea:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .form-actions {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: #6b7280;
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .btn-secondary:hover {
            background: #4b5563;
        }

        /* 搜索区域样式 */
        .search-container {
            background: white;
            border-radius: 15px;
            padding: 20px 30px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
        }

        .search-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            align-items: end;
        }

        .search-group {
            display: flex;
            flex-direction: column;
        }

        .search-label {
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
        }

        .search-input {
            padding: 10px 15px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .search-actions {
            display: flex;
            gap: 10px;
        }

        .btn-search {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .btn-search-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .btn-search-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-search-secondary {
            background: #6b7280;
            color: white;
        }

        .btn-search-secondary:hover {
            background: #4b5563;
        }

        /* 表格响应式 */
        .table-container {
            overflow-x: auto;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .sidebar {
                width: 100%;
                position: relative;
                height: auto;
            }
            
            .main-content {
                margin-left: 0;
            }
            
            .header-top {
                flex-direction: column;
                gap: 20px;
                text-align: center;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 左侧侧边栏 -->
        <nav class="sidebar">
            <div class="sidebar-header">
                <div class="sidebar-title">遗体捐献告别仪式管理系统</div>
            </div>
            
            <ul class="nav-menu">
                <li class="nav-item">
                    <a href="host-management.html" class="nav-link">
                        <span class="nav-icon">🎤</span>
                        <span class="nav-text">主持人管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link active" onclick="switchFunction('ceremony-booking')">
                        <span class="nav-icon">📅</span>
                        <span class="nav-text">告别仪式预约管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link" onclick="switchFunction('volunteer-management')">
                        <span class="nav-icon">🤝</span>
                        <span class="nav-text">志愿者管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="activity-management.html" class="nav-link">
                        <span class="nav-icon">🏠</span>
                        <span class="nav-text">返回主页</span>
                    </a>
                </li>
            </ul>
        </nav>

        <!-- 右侧主内容区域 -->
        <main class="main-content">
            <div class="content-header">
                <div class="header-top">
                    <div class="header-left">
                        <h1>遗体捐献告别仪式管理</h1>
                        <div class="breadcrumb">活动管理 > 遗体捐献告别仪式管理</div>
                    </div>
                    <div class="user-info">
                        <div class="user-avatar">👤</div>
                        <div class="user-details">
                            <div class="user-name" id="current-user-name">遗体捐献管理员</div>
                            <div class="user-role" id="current-user-role">遗体捐献管理员</div>
                        </div>
                        <button class="btn-logout" onclick="logout()">退出登录</button>
                    </div>
                </div>
            </div>



            <!-- 告别仪式预约管理功能 -->
            <div id="ceremony-booking-content" class="content-section">
                <div class="function-module">
                    <div class="module-header">告别仪式预约管理</div>
                    <div class="module-content">
                        <div class="search-container">
                            <div class="search-grid">
                                <div class="search-group">
                                    <label class="search-label">逝者姓名</label>
                                    <input type="text" class="search-input" id="deceased-name-search" placeholder="输入逝者姓名">
                                </div>
                                <div class="search-group">
                                    <label class="search-label">预约日期</label>
                                    <input type="date" class="search-input" id="booking-date-search">
                                </div>
                                <div class="search-group">
                                    <label class="search-label">预约状态</label>
                                    <select class="search-input" id="booking-status-search">
                                        <option value="">全部状态</option>
                                        <option value="pending">待确认</option>
                                        <option value="confirmed">已确认</option>
                                        <option value="completed">已完成</option>
                                        <option value="cancelled">已取消</option>
                                    </select>
                                </div>
                                <div class="search-group">
                                    <label class="search-label">&nbsp;</label>
                                    <div class="search-actions">
                                        <button type="button" class="btn-search btn-search-primary" onclick="searchBookings()">搜索</button>
                                        <button type="button" class="btn-search btn-search-secondary" onclick="clearBookingSearch()">清除</button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="table-container">
                            <table class="data-table">
                                <thead>
                                    <tr>
                                        <th>预约编号</th>
                                        <th>逝者姓名</th>
                                        <th>家属联系人</th>
                                        <th>联系电话</th>
                                        <th>预约日期</th>
                                        <th>预约时间</th>
                                        <th>主持人</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="booking-table-body">
                                    <tr>
                                        <td>B001</td>
                                        <td>张老先生</td>
                                        <td>张小明</td>
                                        <td>13900139000</td>
                                        <td>2024-01-20</td>
                                        <td>14:00-16:00</td>
                                        <td>张主持</td>
                                        <td><span class="status-badge status-pending">待确认</span></td>
                                        <td class="action-buttons">
                                            <button class="btn-action btn-action-view" onclick="viewBooking('B001')">查看</button>
                                            <button class="btn-action btn-action-approve" onclick="approveBooking('B001')">确认</button>
                                            <button class="btn-action btn-action-reject" onclick="rejectBooking('B001')">拒绝</button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>B002</td>
                                        <td>李老太太</td>
                                        <td>李小红</td>
                                        <td>13800238000</td>
                                        <td>2024-01-22</td>
                                        <td>10:00-12:00</td>
                                        <td>李主持</td>
                                        <td><span class="status-badge status-confirmed">已确认</span></td>
                                        <td class="action-buttons">
                                            <button class="btn-action btn-action-view" onclick="viewBooking('B002')">查看</button>
                                            <button class="btn-action btn-action-edit" onclick="editBooking('B002')">编辑</button>
                                            <button class="btn-action btn-action-delete" onclick="deleteBooking('B002')">删除</button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>B003</td>
                                        <td>王先生</td>
                                        <td>王小华</td>
                                        <td>13700337000</td>
                                        <td>2024-01-18</td>
                                        <td>16:00-18:00</td>
                                        <td>张主持</td>
                                        <td><span class="status-badge status-completed">已完成</span></td>
                                        <td class="action-buttons">
                                            <button class="btn-action btn-action-view" onclick="viewBooking('B003')">查看</button>
                                            <button class="btn-action btn-action-edit" onclick="editBooking('B003')">编辑</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 志愿者管理功能 -->
            <div id="volunteer-management-content" class="content-section" style="display: none;">
                <div class="function-module">
                    <div class="module-header">志愿者管理</div>
                    <div class="module-content">
                        <div class="form-container">
                            <form id="volunteer-form">
                                <div class="form-grid">
                                    <div class="form-group">
                                        <label class="form-label">志愿者姓名 *</label>
                                        <input type="text" class="form-input" name="volunteerName" required>
                                    </div>
                                    <div class="form-group">
                                        <label class="form-label">联系电话 *</label>
                                        <input type="tel" class="form-input" name="volunteerPhone" required>
                                    </div>
                                    <div class="form-group">
                                        <label class="form-label">身份证号 *</label>
                                        <input type="text" class="form-input" name="volunteerIdCard" required>
                                    </div>
                                    <div class="form-group">
                                        <label class="form-label">服务类型</label>
                                        <select class="form-input" name="volunteerType">
                                            <option value="">请选择服务类型</option>
                                            <option value="仪式协助">仪式协助</option>
                                            <option value="家属陪伴">家属陪伴</option>
                                            <option value="场地布置">场地布置</option>
                                            <option value="后勤支持">后勤支持</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="form-label">个人简介</label>
                                    <textarea class="form-textarea" name="volunteerBio" placeholder="请描述志愿者的服务意愿和特长..."></textarea>
                                </div>
                                <div class="form-actions">
                                    <button type="button" class="btn-secondary" onclick="resetVolunteerForm()">重置</button>
                                    <button type="submit" class="btn-primary">添加志愿者</button>
                                </div>
                            </form>
                        </div>

                        <div class="search-container">
                            <div class="search-grid">
                                <div class="search-group">
                                    <label class="search-label">志愿者姓名</label>
                                    <input type="text" class="search-input" id="volunteer-name-search" placeholder="输入志愿者姓名">
                                </div>
                                <div class="search-group">
                                    <label class="search-label">服务类型</label>
                                    <select class="search-input" id="volunteer-type-search">
                                        <option value="">全部类型</option>
                                        <option value="仪式协助">仪式协助</option>
                                        <option value="家属陪伴">家属陪伴</option>
                                        <option value="场地布置">场地布置</option>
                                        <option value="后勤支持">后勤支持</option>
                                    </select>
                                </div>
                                <div class="search-group">
                                    <label class="search-label">状态</label>
                                    <select class="search-input" id="volunteer-status-search">
                                        <option value="">全部状态</option>
                                        <option value="active">活跃</option>
                                        <option value="inactive">不活跃</option>
                                        <option value="available">可服务</option>
                                        <option value="busy">忙碌中</option>
                                    </select>
                                </div>
                                <div class="search-group">
                                    <label class="search-label">&nbsp;</label>
                                    <div class="search-actions">
                                        <button type="button" class="btn-search btn-search-primary" onclick="searchVolunteers()">搜索</button>
                                        <button type="button" class="btn-search btn-search-secondary" onclick="clearVolunteerSearch()">清除</button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="table-container">
                            <table class="data-table">
                                <thead>
                                    <tr>
                                        <th>志愿者ID</th>
                                        <th>姓名</th>
                                        <th>电话</th>
                                        <th>身份证号</th>
                                        <th>服务类型</th>
                                        <th>服务时长</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="volunteer-table-body">
                                    <tr>
                                        <td>V001</td>
                                        <td>陈志愿者</td>
                                        <td>13600136000</td>
                                        <td>110101199001011234</td>
                                        <td>仪式协助</td>
                                        <td>50小时</td>
                                        <td><span class="status-badge status-active">活跃</span></td>
                                        <td class="action-buttons">
                                            <button class="btn-action btn-action-view" onclick="viewVolunteer('V001')">查看</button>
                                            <button class="btn-action btn-action-edit" onclick="editVolunteer('V001')">编辑</button>
                                            <button class="btn-action btn-action-delete" onclick="deleteVolunteer('V001')">删除</button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>V002</td>
                                        <td>刘志愿者</td>
                                        <td>13500235000</td>
                                        <td>110101198505051234</td>
                                        <td>家属陪伴</td>
                                        <td>30小时</td>
                                        <td><span class="status-badge status-active">活跃</span></td>
                                        <td class="action-buttons">
                                            <button class="btn-action btn-action-view" onclick="viewVolunteer('V002')">查看</button>
                                            <button class="btn-action btn-action-edit" onclick="editVolunteer('V002')">编辑</button>
                                            <button class="btn-action btn-action-delete" onclick="deleteVolunteer('V002')">删除</button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>V003</td>
                                        <td>赵志愿者</td>
                                        <td>13400334000</td>
                                        <td>110101199203031234</td>
                                        <td>场地布置</td>
                                        <td>20小时</td>
                                        <td><span class="status-badge status-inactive">不活跃</span></td>
                                        <td class="action-buttons">
                                            <button class="btn-action btn-action-view" onclick="viewVolunteer('V003')">查看</button>
                                            <button class="btn-action btn-action-edit" onclick="editVolunteer('V003')">编辑</button>
                                            <button class="btn-action btn-action-delete" onclick="deleteVolunteer('V003')">删除</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <script>
        // 页面加载时设置用户信息
        document.addEventListener('DOMContentLoaded', function() {
            const currentUser = localStorage.getItem('organDonationCurrentUser');
            if (currentUser) {
                const user = JSON.parse(currentUser);
                document.getElementById('current-user-name').textContent = user.name || '遗体捐献管理员';
                document.getElementById('current-user-role').textContent = user.role || '遗体捐献管理员';
            }
        });

        // 功能切换
        function switchFunction(functionName) {
            // 移除所有活动状态
            document.querySelectorAll('.nav-link').forEach(link => {
                link.classList.remove('active');
            });
            
            // 添加活动状态到当前点击的链接
            event.target.closest('.nav-link').classList.add('active');
            
            // 隐藏所有内容
            const allContent = document.querySelectorAll('.content-section');
            allContent.forEach(content => {
                content.style.display = 'none';
            });

            // 显示对应内容
            const targetContent = document.getElementById(functionName + '-content');
            if (targetContent) {
                targetContent.style.display = 'block';
            }
        }



        // 告别仪式预约管理相关函数
        function searchBookings() {
            const name = document.getElementById('deceased-name-search').value;
            const date = document.getElementById('booking-date-search').value;
            const status = document.getElementById('booking-status-search').value;
            alert(`搜索预约: 逝者姓名: ${name}, 日期: ${date}, 状态: ${status}`);
        }

        function clearBookingSearch() {
            document.getElementById('deceased-name-search').value = '';
            document.getElementById('booking-date-search').value = '';
            document.getElementById('booking-status-search').value = '';
        }

        function viewBooking(id) {
            alert(`查看预约详情 ID: ${id}`);
        }

        function approveBooking(id) {
            if (confirm('确定要确认这个预约吗？')) {
                alert(`确认预约 ID: ${id}`);
            }
        }

        function rejectBooking(id) {
            if (confirm('确定要拒绝这个预约吗？')) {
                alert(`拒绝预约 ID: ${id}`);
            }
        }

        function editBooking(id) {
            alert(`编辑预约信息 ID: ${id}`);
        }

        function deleteBooking(id) {
            if (confirm('确定要删除这个预约吗？')) {
                alert(`删除预约 ID: ${id}`);
            }
        }

        // 志愿者管理相关函数
        document.getElementById('volunteer-form').addEventListener('submit', function(e) {
            e.preventDefault();
            const formData = new FormData(this);
            
            const volunteerData = {
                id: 'V' + Date.now(),
                name: formData.get('volunteerName'),
                phone: formData.get('volunteerPhone'),
                idCard: formData.get('volunteerIdCard'),
                type: formData.get('volunteerType'),
                bio: formData.get('volunteerBio')
            };

            console.log('添加志愿者数据:', volunteerData);
            alert('志愿者添加成功！');
            
            this.reset();
        });

        function resetVolunteerForm() {
            document.getElementById('volunteer-form').reset();
        }

        function searchVolunteers() {
            const name = document.getElementById('volunteer-name-search').value;
            const type = document.getElementById('volunteer-type-search').value;
            const status = document.getElementById('volunteer-status-search').value;
            alert(`搜索志愿者: 姓名: ${name}, 类型: ${type}, 状态: ${status}`);
        }

        function clearVolunteerSearch() {
            document.getElementById('volunteer-name-search').value = '';
            document.getElementById('volunteer-type-search').value = '';
            document.getElementById('volunteer-status-search').value = '';
        }

        function viewVolunteer(id) {
            alert(`查看志愿者详情 ID: ${id}`);
        }

        function editVolunteer(id) {
            alert(`编辑志愿者信息 ID: ${id}`);
        }

        function deleteVolunteer(id) {
            if (confirm('确定要删除这个志愿者吗？')) {
                alert(`删除志愿者 ID: ${id}`);
            }
        }

        // 退出登录
        function logout() {
            localStorage.removeItem('organDonationIsLoggedIn');
            localStorage.removeItem('organDonationCurrentUser');
            window.location.href = 'activity-management.html';
        }
    </script>
</body>
</html>
